<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .div1{
            width: 200px;
            height: 200px;
            margin-top: 30px;
            border: 2px solid greenyellow;
            position: relative;
        }
        p{
            font-size: 30px;
            position: absolute;
            top: 50%;
            left: 50%;
            margin-top: -21px;
            margin-left: -31px;
        }
        .div2{
            width: 30px;
            height: 30px;
           
            text-align: center;
            border-radius: 50px;
            background-color: red;
            position: absolute;
            right: -15px;
            top: -15px;
        }
    </style>
</head>
<body>
    <div class="div1">
        <div class="div2">2</div>
        <p>微信</p>
    </div>
</body>
</html>